package com.jie.jie.xiaohua.presenter;

import com.jaydenxiao.common.baserx.RxSubscriber;
import com.jie.jie.xiaohua.contract.XiaohuaContract;
import com.jie.jie.xiaohua.model.XiaohuaBean;

/**
 * Created by jie on 2017/1/24.
 */

public class XioahuaPresenter extends XiaohuaContract.Presenter {
    @Override
    public void getXiaohua(String sort, String time, int page, int pagesize, final boolean updata) {
        mModel.getXiaohua(sort, time, page, pagesize).subscribe(new RxSubscriber<XiaohuaBean>(mContext, true) {

            @Override
            protected void _onNext(XiaohuaBean xiaohuaBean) {
                mView.stopLoading();
                mView.returnXioahua(xiaohuaBean,updata);

            }

            @Override
            protected void _onError(String message) {

            }
        });
    }
}
